package com.hmall.search.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hmall.common.dto.PageDTO;
import com.hmall.common.pojo.Item;
import com.hmall.common.pojo.ItemDoc;
import com.hmall.common.pojo.RequestParams;

import java.io.IOException;
import java.util.List;
import java.util.Map;


public interface SearchService extends IService<Item> {
    /**
     * 分页查询
     * @param param
     * @return
     * @throws IOException
     */
    PageDTO<ItemDoc> search(RequestParams param) throws IOException;

    /**
     * 聚合查询
     * @param params
     * @return
     */
    Map<String, List<String>> filters(RequestParams params) throws IOException;
}
